﻿using NUnit.Framework;
using WpfApplication6.Model;

namespace WpfApplication6.ViewModel
{
    [TestFixture]
    public class ProductViewModelTest
    {
        [Test]
        public void CanInitItemTest()
        {
            //arrange
            var product = new ProductItem {Id = 1, Name = "a", CategoryName = "cat1"};

            //act
            var viewmodel = new ProductViewModel(product);

            //assert
            Assert.IsTrue(viewmodel.Item.Id == 1);
            Assert.IsTrue(viewmodel.Item.Name == "a");
            Assert.IsTrue(viewmodel.Item.CategoryName == "cat1");
        }
    }
}